import {Socket} from "net";

const client = new Socket();

client.connect(39999, '127.0.0.1', function () {
    console.log("connect the server");
    // client.write("message from client");
})

client.on("data", function (data) {
    console.log("the data of server is " + data.toString());
})

client.on("end", function () {
    console.log("data end");
})